home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / gadgets / string.h < prev   
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.2 KB  |  54 lines

  1. //$Id: string.h 1.2 1997/07/14 04:27:28 dlorre Exp dlorre $
  2. #ifndef CLASS_STRING_H
  3. #define CLASS_STRING_H
  4.  
  5. #ifndef EXEC_TYPES_H
  6. #include <exec/types.h>
  7. #endif
  8.  
  9. #ifndef INTUITION_INTUITION_H
  10. struct Image ;
  11. #endif
  12.  
  13. #ifndef LIBRARIES_GADTOOLS_H
  14. #define PLACETEXT_LEFT  0x0001  /* Right-align text on left side */
  15. #endif
  16.  
  17. #ifndef CLASS_WINDOW_H
  18. class window ;
  19. #endif
  20.  
  21. #ifndef CLASS_GADGETLIST_H
  22. class gadgetlist ;
  23. #endif
  24.  
  25. #ifndef CLASS_GADGET_H
  26. #include "gadgets/gadget.h"
  27. #endif
  28.  
  29. // ========================================================================
  30. // ==========================  STRING CLASS ===============================
  31. // ========================================================================
  32.  
  33. class string : public gadget
  34. {
  35.     Image   *im ;
  36.     TextFont *gfont ;
  37. public:
  38.     long    maxsize ;
  39.     STRPTR curstring ;
  40.     STRPTR  buffer ;
  41.     string(gadgetlist *gl,
  42.            void (window::*func)(gadget *, unsigned long, unsigned short),
  43.            const char *title=NULL,
  44.            const char *text=NULL,
  45.            long max=64,
  46.            unsigned long flags=PLACETEXT_LEFT,
  47.            unsigned long justify=0) ;
  48.     ~string() ;
  49.     void action(unsigned long, unsigned short) ;
  50.     void set(STRPTR) ;
  51.     void keystroke(BOOL shifted) ;
  52. };
  53. #endif
  54.